'''
Created on Aug 13, 2012

@author: petrina
'''

from indicatorset import Indicatorset
from network_completeness import Network_completeness
import logging


class Network_indicatorset(Indicatorset):
    '''
    Set of indicators which uses a linkset (i.e. a network) as input.
    
    Indicators of this set need information of serveral links in order to 
    analyze a link-network.
    If the indiconf is set None all these indicators will be calculated.
    '''


    def __init__(self, indiconf = None, links = None):
        '''
        @param indiconf: Indicator configuaration (default: None, i.e. all possible indicators are added to the set)
        @param links: linkset for creating the indicators
        '''

        Indicatorset.__init__(self, indiconf)
        self._links = links
        
        logging.debug("Network_indicatorset: created Network_indicatorset")
        

        
    #----------------------public methods of the class-------------------------
        
    
    def build_all_indis(self):
        '''
        Add all possible indicators to the set.
        '''
        
        # add indicators to private set
        self._indiset.add(Network_completeness(self._links))
        
        logging.info("Network_indicatorset: added all possible indicators to the Network_indicatorset")      